package com.shangxian.giveithome.code;


public enum MechanismCode implements Code {
    USER_NOT_AUTH(false, 30001, "您无权查看其它机构信息"),
    USER_NOT_VOLUNTEER(false, 500, "请不要重复申请"),
    USER_NOT_S_AUTH(false, 30004, "您无权查看机构信息"),
    USER_NOT_U_AUTH(false, 30004, "您无权修改机构信息"),
    USER_NOT_D_AUTH(false, 30009, "您无权删除其他机构信息"),
    CREATE_MECHANISM(false, 500, "该机构名称已存在"),
    UPDATE_MECHANISM(false, 500, "修改失败,请稍后重试"),
    VOLUNTEER_NOT_DATA(false, 30005, "义工不存在");
    private boolean success;

    private Integer code;

    private String message;

    MechanismCode(boolean success, Integer code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }

    @Override
    public boolean success() {
        return this.success;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String message() {
        return this.message;
    }
}
